package com.ymatou.app.service;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;

public class ActivityinfoCall extends YmatouBaseCall {
	private static String opurl ="api/nodesearch/assortment/activityinfo";

	public ActivityinfoCall() {
		super(EnvSetup.getSystemUrl("app"),opurl,"GET","PARAM");
	}
	
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public JSONObject getActivityInfo(){
		JSONObject activity=null;
		try {
			activity = new JSONObject(getReturnData()).getJSONObject("activity");
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}	
		return activity;		
	}
}
